using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VVEPROV
    {
        public DataRow Convert2VEPROV(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryVEPROV(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["VEPMANDANT"] = " ".PadRight(2 ); 
         dwReturn["VEPVERTNR"] = " ".PadRight(8 ); 
         dwReturn["VEPKOLL"] = " ".PadRight(5 ); 
         dwReturn["VEPPRGRP"] = " ".PadRight(8 ); 
         dwReturn["VEPPVGRP"] = " ".PadRight(3 ); 
         dwReturn["VEPKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["VEPPVBAS01"] = " ".PadRight(1 ); 
         dwReturn["VEPPVVAR01"] = " ".PadRight(1 ); 
         dwReturn["VEPME01"] = " ".PadRight(3 ); 
         dwReturn["VEPMEGRP01"] = " ".PadRight(1 ); 
         dwReturn["VEPMEFKT01"] = " ".PadRight(12 ); 
         dwReturn["VEPPRNBTL01"] = " ".PadRight(0 ); 
         dwReturn["VEPPVBAS02"] = " ".PadRight(1 ); 
         dwReturn["VEPPVVAR02"] = " ".PadRight(1 ); 
         dwReturn["VEPME02"] = " ".PadRight(3 ); 
         dwReturn["VEPMEGRP02"] = " ".PadRight(1 ); 
         dwReturn["VEPMEFKT02"] = " ".PadRight(12 ); 
         dwReturn["VEPPRNBTL02"] = " ".PadRight(0 ); 
         dwReturn["VEPPVBAS03"] = " ".PadRight(1 ); 
         dwReturn["VEPPVVAR03"] = " ".PadRight(1 ); 
         dwReturn["VEPME03"] = " ".PadRight(3 ); 
         dwReturn["VEPMEGRP03"] = " ".PadRight(1 ); 
         dwReturn["VEPMEFKT03"] = " ".PadRight(12 ); 
         dwReturn["VEPPRNBTL03"] = " ".PadRight(0 ); 
         dwReturn["VEPABME"] = " ".PadRight(3 ); 
         dwReturn["VEPABMEGRP"] = " ".PadRight(1 ); 
         dwReturn["VEPABMEFKT"] = " ".PadRight(12 ); 
         dwReturn["VEPZENSUR01"] = " ".PadRight(1 ); 
         dwReturn["VEPORDER01"] = " ".PadRight(4 ); 
         dwReturn["VEPABMGE01"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVP01"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVA01"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAP01"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAA01"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKP01"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKA01"] = " ".PadRight(0 ); 
         dwReturn["VEPZENSUR02"] = " ".PadRight(1 ); 
         dwReturn["VEPORDER02"] = " ".PadRight(4 ); 
         dwReturn["VEPABMGE02"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVP02"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVA02"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAP02"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAA02"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKP02"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKA02"] = " ".PadRight(0 ); 
         dwReturn["VEPZENSUR03"] = " ".PadRight(1 ); 
         dwReturn["VEPORDER03"] = " ".PadRight(4 ); 
         dwReturn["VEPABMGE03"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVP03"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVA03"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAP03"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAA03"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKP03"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKA03"] = " ".PadRight(0 ); 
         dwReturn["VEPZENSUR04"] = " ".PadRight(1 ); 
         dwReturn["VEPORDER04"] = " ".PadRight(4 ); 
         dwReturn["VEPABMGE04"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVP04"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVA04"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAP04"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAA04"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKP04"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKA04"] = " ".PadRight(0 ); 
         dwReturn["VEPZENSUR05"] = " ".PadRight(1 ); 
         dwReturn["VEPORDER05"] = " ".PadRight(4 ); 
         dwReturn["VEPABMGE05"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVP05"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVA05"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAP05"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAA05"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKP05"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKA05"] = " ".PadRight(0 ); 
         dwReturn["VEPZENSUR06"] = " ".PadRight(1 ); 
         dwReturn["VEPORDER06"] = " ".PadRight(4 ); 
         dwReturn["VEPABMGE06"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVP06"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVA06"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAP06"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAA06"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKP06"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKA06"] = " ".PadRight(0 ); 
         dwReturn["VEPZENSUR07"] = " ".PadRight(1 ); 
         dwReturn["VEPORDER07"] = " ".PadRight(4 ); 
         dwReturn["VEPABMGE07"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVP07"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVA07"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAP07"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAA07"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKP07"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKA07"] = " ".PadRight(0 ); 
         dwReturn["VEPZENSUR08"] = " ".PadRight(1 ); 
         dwReturn["VEPORDER08"] = " ".PadRight(4 ); 
         dwReturn["VEPABMGE08"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVP08"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVA08"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAP08"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAA08"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKP08"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKA08"] = " ".PadRight(0 ); 
         dwReturn["VEPZENSUR09"] = " ".PadRight(1 ); 
         dwReturn["VEPORDER09"] = " ".PadRight(4 ); 
         dwReturn["VEPABMGE09"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVP09"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVVA09"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAP09"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVAA09"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKP09"] = " ".PadRight(0 ); 
         dwReturn["VEPPROVKA09"] = " ".PadRight(0 ); 
         dwReturn["VEPSONDPV"] = " ".PadRight(0 ); 
         dwReturn["VEPSONDDATV"] = " ".PadRight(0 ); 
         dwReturn["VEPSONDDATB"] = " ".PadRight(0 ); 
         dwReturn["VEPERSTPV"] = " ".PadRight(0 ); 
         dwReturn["VEPVORDATB"] = " ".PadRight(0 ); 
         dwReturn["VEPFILLER"] = " ".PadRight(41 ); 
         dwReturn["VEPAENZL"] = " ".PadRight(0 ); 
         dwReturn["VEPAENB"] = " ".PadRight(8 ); 
         dwReturn["VEPAEND"] = " ".PadRight(0 ); 
         dwReturn["VEPNEUB"] = " ".PadRight(8 ); 
         dwReturn["VEPNEUD"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapVEPROV(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveVEPROV(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryVEPROV(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapVEPROV(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertVEPROV(dwLocal, ITXDBVERSION);
            }
            UpdateVEPROV(dwLocal);
        }
        public void InsertVEPROV(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO VEPROV(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryVEPROV(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM VEPROV WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM VEPROV  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "VEPROV";
            Return = Result;
            return Return;
        }
        public void DeleteVEPROV(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM VEPROV   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateVEPROV(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE VEPROV SET "
                    +"VEPMANDANT= :VEPMANDANT,"
                    +"VEPVERTNR= :VEPVERTNR,"
                    +"VEPKOLL= :VEPKOLL,"
                    +"VEPPRGRP= :VEPPRGRP,"
                    +"VEPPVGRP= :VEPPVGRP,"
                    +"VEPKUNDNR= :VEPKUNDNR,"
                    +"VEPPVBAS01= :VEPPVBAS01,"
                    +"VEPPVVAR01= :VEPPVVAR01,"
                    +"VEPME01= :VEPME01,"
                    +"VEPMEGRP01= :VEPMEGRP01,"
                    +"VEPMEFKT01= :VEPMEFKT01,"
                    +"VEPPRNBTL01= :VEPPRNBTL01,"
                    +"VEPPVBAS02= :VEPPVBAS02,"
                    +"VEPPVVAR02= :VEPPVVAR02,"
                    +"VEPME02= :VEPME02,"
                    +"VEPMEGRP02= :VEPMEGRP02,"
                    +"VEPMEFKT02= :VEPMEFKT02,"
                    +"VEPPRNBTL02= :VEPPRNBTL02,"
                    +"VEPPVBAS03= :VEPPVBAS03,"
                    +"VEPPVVAR03= :VEPPVVAR03,"
                    +"VEPME03= :VEPME03,"
                    +"VEPMEGRP03= :VEPMEGRP03,"
                    +"VEPMEFKT03= :VEPMEFKT03,"
                    +"VEPPRNBTL03= :VEPPRNBTL03,"
                    +"VEPABME= :VEPABME,"
                    +"VEPABMEGRP= :VEPABMEGRP,"
                    +"VEPABMEFKT= :VEPABMEFKT,"
                    +"VEPZENSUR01= :VEPZENSUR01,"
                    +"VEPORDER01= :VEPORDER01,"
                    +"VEPABMGE01= :VEPABMGE01,"
                    +"VEPPROVVP01= :VEPPROVVP01,"
                    +"VEPPROVVA01= :VEPPROVVA01,"
                    +"VEPPROVAP01= :VEPPROVAP01,"
                    +"VEPPROVAA01= :VEPPROVAA01,"
                    +"VEPPROVKP01= :VEPPROVKP01,"
                    +"VEPPROVKA01= :VEPPROVKA01,"
                    +"VEPZENSUR02= :VEPZENSUR02,"
                    +"VEPORDER02= :VEPORDER02,"
                    +"VEPABMGE02= :VEPABMGE02,"
                    +"VEPPROVVP02= :VEPPROVVP02,"
                    +"VEPPROVVA02= :VEPPROVVA02,"
                    +"VEPPROVAP02= :VEPPROVAP02,"
                    +"VEPPROVAA02= :VEPPROVAA02,"
                    +"VEPPROVKP02= :VEPPROVKP02,"
                    +"VEPPROVKA02= :VEPPROVKA02,"
                    +"VEPZENSUR03= :VEPZENSUR03,"
                    +"VEPORDER03= :VEPORDER03,"
                    +"VEPABMGE03= :VEPABMGE03,"
                    +"VEPPROVVP03= :VEPPROVVP03,"
                    +"VEPPROVVA03= :VEPPROVVA03,"
                    +"VEPPROVAP03= :VEPPROVAP03,"
                    +"VEPPROVAA03= :VEPPROVAA03,"
                    +"VEPPROVKP03= :VEPPROVKP03,"
                    +"VEPPROVKA03= :VEPPROVKA03,"
                    +"VEPZENSUR04= :VEPZENSUR04,"
                    +"VEPORDER04= :VEPORDER04,"
                    +"VEPABMGE04= :VEPABMGE04,"
                    +"VEPPROVVP04= :VEPPROVVP04,"
                    +"VEPPROVVA04= :VEPPROVVA04,"
                    +"VEPPROVAP04= :VEPPROVAP04,"
                    +"VEPPROVAA04= :VEPPROVAA04,"
                    +"VEPPROVKP04= :VEPPROVKP04,"
                    +"VEPPROVKA04= :VEPPROVKA04,"
                    +"VEPZENSUR05= :VEPZENSUR05,"
                    +"VEPORDER05= :VEPORDER05,"
                    +"VEPABMGE05= :VEPABMGE05,"
                    +"VEPPROVVP05= :VEPPROVVP05,"
                    +"VEPPROVVA05= :VEPPROVVA05,"
                    +"VEPPROVAP05= :VEPPROVAP05,"
                    +"VEPPROVAA05= :VEPPROVAA05,"
                    +"VEPPROVKP05= :VEPPROVKP05,"
                    +"VEPPROVKA05= :VEPPROVKA05,"
                    +"VEPZENSUR06= :VEPZENSUR06,"
                    +"VEPORDER06= :VEPORDER06,"
                    +"VEPABMGE06= :VEPABMGE06,"
                    +"VEPPROVVP06= :VEPPROVVP06,"
                    +"VEPPROVVA06= :VEPPROVVA06,"
                    +"VEPPROVAP06= :VEPPROVAP06,"
                    +"VEPPROVAA06= :VEPPROVAA06,"
                    +"VEPPROVKP06= :VEPPROVKP06,"
                    +"VEPPROVKA06= :VEPPROVKA06,"
                    +"VEPZENSUR07= :VEPZENSUR07,"
                    +"VEPORDER07= :VEPORDER07,"
                    +"VEPABMGE07= :VEPABMGE07,"
                    +"VEPPROVVP07= :VEPPROVVP07,"
                    +"VEPPROVVA07= :VEPPROVVA07,"
                    +"VEPPROVAP07= :VEPPROVAP07,"
                    +"VEPPROVAA07= :VEPPROVAA07,"
                    +"VEPPROVKP07= :VEPPROVKP07,"
                    +"VEPPROVKA07= :VEPPROVKA07,"
                    +"VEPZENSUR08= :VEPZENSUR08,"
                    +"VEPORDER08= :VEPORDER08,"
                    +"VEPABMGE08= :VEPABMGE08,"
                    +"VEPPROVVP08= :VEPPROVVP08,"
                    +"VEPPROVVA08= :VEPPROVVA08,"
                    +"VEPPROVAP08= :VEPPROVAP08,"
                    +"VEPPROVAA08= :VEPPROVAA08,"
                    +"VEPPROVKP08= :VEPPROVKP08,"
                    +"VEPPROVKA08= :VEPPROVKA08,"
                    +"VEPZENSUR09= :VEPZENSUR09,"
                    +"VEPORDER09= :VEPORDER09,"
                    +"VEPABMGE09= :VEPABMGE09,"
                    +"VEPPROVVP09= :VEPPROVVP09,"
                    +"VEPPROVVA09= :VEPPROVVA09,"
                    +"VEPPROVAP09= :VEPPROVAP09,"
                    +"VEPPROVAA09= :VEPPROVAA09,"
                    +"VEPPROVKP09= :VEPPROVKP09,"
                    +"VEPPROVKA09= :VEPPROVKA09,"
                    +"VEPSONDPV= :VEPSONDPV,"
                    +"VEPSONDDATV= :VEPSONDDATV,"
                    +"VEPSONDDATB= :VEPSONDDATB,"
                    +"VEPERSTPV= :VEPERSTPV,"
                    +"VEPVORDATB= :VEPVORDATB,"
                    +"VEPFILLER= :VEPFILLER,"
                    +"VEPAENZL= :VEPAENZL,"
                    +"VEPAENB= :VEPAENB,"
                    +"VEPAEND= :VEPAEND,"
                    +"VEPNEUB= :VEPNEUB,"
                    +"VEPNEUD= :VEPNEUD,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("VEPMANDANT", OracleType.NVarChar).Value = dwData["VEPMANDANT"].ToString(); 
          or1.Parameters.Add("VEPVERTNR", OracleType.NVarChar).Value = dwData["VEPVERTNR"].ToString(); 
          or1.Parameters.Add("VEPKOLL", OracleType.NVarChar).Value = dwData["VEPKOLL"].ToString(); 
          or1.Parameters.Add("VEPPRGRP", OracleType.NVarChar).Value = dwData["VEPPRGRP"].ToString(); 
          or1.Parameters.Add("VEPPVGRP", OracleType.NVarChar).Value = dwData["VEPPVGRP"].ToString(); 
          or1.Parameters.Add("VEPKUNDNR", OracleType.NVarChar).Value = dwData["VEPKUNDNR"].ToString(); 
          or1.Parameters.Add("VEPPVBAS01", OracleType.NVarChar).Value = dwData["VEPPVBAS01"].ToString(); 
          or1.Parameters.Add("VEPPVVAR01", OracleType.NVarChar).Value = dwData["VEPPVVAR01"].ToString(); 
          or1.Parameters.Add("VEPME01", OracleType.NVarChar).Value = dwData["VEPME01"].ToString(); 
          or1.Parameters.Add("VEPMEGRP01", OracleType.NVarChar).Value = dwData["VEPMEGRP01"].ToString(); 
          or1.Parameters.Add("VEPMEFKT01", OracleType.NVarChar).Value = dwData["VEPMEFKT01"].ToString(); 
          or1.Parameters.Add("VEPPRNBTL01", OracleType.NVarChar).Value = dwData["VEPPRNBTL01"].ToString(); 
          or1.Parameters.Add("VEPPVBAS02", OracleType.NVarChar).Value = dwData["VEPPVBAS02"].ToString(); 
          or1.Parameters.Add("VEPPVVAR02", OracleType.NVarChar).Value = dwData["VEPPVVAR02"].ToString(); 
          or1.Parameters.Add("VEPME02", OracleType.NVarChar).Value = dwData["VEPME02"].ToString(); 
          or1.Parameters.Add("VEPMEGRP02", OracleType.NVarChar).Value = dwData["VEPMEGRP02"].ToString(); 
          or1.Parameters.Add("VEPMEFKT02", OracleType.NVarChar).Value = dwData["VEPMEFKT02"].ToString(); 
          or1.Parameters.Add("VEPPRNBTL02", OracleType.NVarChar).Value = dwData["VEPPRNBTL02"].ToString(); 
          or1.Parameters.Add("VEPPVBAS03", OracleType.NVarChar).Value = dwData["VEPPVBAS03"].ToString(); 
          or1.Parameters.Add("VEPPVVAR03", OracleType.NVarChar).Value = dwData["VEPPVVAR03"].ToString(); 
          or1.Parameters.Add("VEPME03", OracleType.NVarChar).Value = dwData["VEPME03"].ToString(); 
          or1.Parameters.Add("VEPMEGRP03", OracleType.NVarChar).Value = dwData["VEPMEGRP03"].ToString(); 
          or1.Parameters.Add("VEPMEFKT03", OracleType.NVarChar).Value = dwData["VEPMEFKT03"].ToString(); 
          or1.Parameters.Add("VEPPRNBTL03", OracleType.NVarChar).Value = dwData["VEPPRNBTL03"].ToString(); 
          or1.Parameters.Add("VEPABME", OracleType.NVarChar).Value = dwData["VEPABME"].ToString(); 
          or1.Parameters.Add("VEPABMEGRP", OracleType.NVarChar).Value = dwData["VEPABMEGRP"].ToString(); 
          or1.Parameters.Add("VEPABMEFKT", OracleType.NVarChar).Value = dwData["VEPABMEFKT"].ToString(); 
          or1.Parameters.Add("VEPZENSUR01", OracleType.NVarChar).Value = dwData["VEPZENSUR01"].ToString(); 
          or1.Parameters.Add("VEPORDER01", OracleType.NVarChar).Value = dwData["VEPORDER01"].ToString(); 
          or1.Parameters.Add("VEPABMGE01", OracleType.NVarChar).Value = dwData["VEPABMGE01"].ToString(); 
          or1.Parameters.Add("VEPPROVVP01", OracleType.NVarChar).Value = dwData["VEPPROVVP01"].ToString(); 
          or1.Parameters.Add("VEPPROVVA01", OracleType.NVarChar).Value = dwData["VEPPROVVA01"].ToString(); 
          or1.Parameters.Add("VEPPROVAP01", OracleType.NVarChar).Value = dwData["VEPPROVAP01"].ToString(); 
          or1.Parameters.Add("VEPPROVAA01", OracleType.NVarChar).Value = dwData["VEPPROVAA01"].ToString(); 
          or1.Parameters.Add("VEPPROVKP01", OracleType.NVarChar).Value = dwData["VEPPROVKP01"].ToString(); 
          or1.Parameters.Add("VEPPROVKA01", OracleType.NVarChar).Value = dwData["VEPPROVKA01"].ToString(); 
          or1.Parameters.Add("VEPZENSUR02", OracleType.NVarChar).Value = dwData["VEPZENSUR02"].ToString(); 
          or1.Parameters.Add("VEPORDER02", OracleType.NVarChar).Value = dwData["VEPORDER02"].ToString(); 
          or1.Parameters.Add("VEPABMGE02", OracleType.NVarChar).Value = dwData["VEPABMGE02"].ToString(); 
          or1.Parameters.Add("VEPPROVVP02", OracleType.NVarChar).Value = dwData["VEPPROVVP02"].ToString(); 
          or1.Parameters.Add("VEPPROVVA02", OracleType.NVarChar).Value = dwData["VEPPROVVA02"].ToString(); 
          or1.Parameters.Add("VEPPROVAP02", OracleType.NVarChar).Value = dwData["VEPPROVAP02"].ToString(); 
          or1.Parameters.Add("VEPPROVAA02", OracleType.NVarChar).Value = dwData["VEPPROVAA02"].ToString(); 
          or1.Parameters.Add("VEPPROVKP02", OracleType.NVarChar).Value = dwData["VEPPROVKP02"].ToString(); 
          or1.Parameters.Add("VEPPROVKA02", OracleType.NVarChar).Value = dwData["VEPPROVKA02"].ToString(); 
          or1.Parameters.Add("VEPZENSUR03", OracleType.NVarChar).Value = dwData["VEPZENSUR03"].ToString(); 
          or1.Parameters.Add("VEPORDER03", OracleType.NVarChar).Value = dwData["VEPORDER03"].ToString(); 
          or1.Parameters.Add("VEPABMGE03", OracleType.NVarChar).Value = dwData["VEPABMGE03"].ToString(); 
          or1.Parameters.Add("VEPPROVVP03", OracleType.NVarChar).Value = dwData["VEPPROVVP03"].ToString(); 
          or1.Parameters.Add("VEPPROVVA03", OracleType.NVarChar).Value = dwData["VEPPROVVA03"].ToString(); 
          or1.Parameters.Add("VEPPROVAP03", OracleType.NVarChar).Value = dwData["VEPPROVAP03"].ToString(); 
          or1.Parameters.Add("VEPPROVAA03", OracleType.NVarChar).Value = dwData["VEPPROVAA03"].ToString(); 
          or1.Parameters.Add("VEPPROVKP03", OracleType.NVarChar).Value = dwData["VEPPROVKP03"].ToString(); 
          or1.Parameters.Add("VEPPROVKA03", OracleType.NVarChar).Value = dwData["VEPPROVKA03"].ToString(); 
          or1.Parameters.Add("VEPZENSUR04", OracleType.NVarChar).Value = dwData["VEPZENSUR04"].ToString(); 
          or1.Parameters.Add("VEPORDER04", OracleType.NVarChar).Value = dwData["VEPORDER04"].ToString(); 
          or1.Parameters.Add("VEPABMGE04", OracleType.NVarChar).Value = dwData["VEPABMGE04"].ToString(); 
          or1.Parameters.Add("VEPPROVVP04", OracleType.NVarChar).Value = dwData["VEPPROVVP04"].ToString(); 
          or1.Parameters.Add("VEPPROVVA04", OracleType.NVarChar).Value = dwData["VEPPROVVA04"].ToString(); 
          or1.Parameters.Add("VEPPROVAP04", OracleType.NVarChar).Value = dwData["VEPPROVAP04"].ToString(); 
          or1.Parameters.Add("VEPPROVAA04", OracleType.NVarChar).Value = dwData["VEPPROVAA04"].ToString(); 
          or1.Parameters.Add("VEPPROVKP04", OracleType.NVarChar).Value = dwData["VEPPROVKP04"].ToString(); 
          or1.Parameters.Add("VEPPROVKA04", OracleType.NVarChar).Value = dwData["VEPPROVKA04"].ToString(); 
          or1.Parameters.Add("VEPZENSUR05", OracleType.NVarChar).Value = dwData["VEPZENSUR05"].ToString(); 
          or1.Parameters.Add("VEPORDER05", OracleType.NVarChar).Value = dwData["VEPORDER05"].ToString(); 
          or1.Parameters.Add("VEPABMGE05", OracleType.NVarChar).Value = dwData["VEPABMGE05"].ToString(); 
          or1.Parameters.Add("VEPPROVVP05", OracleType.NVarChar).Value = dwData["VEPPROVVP05"].ToString(); 
          or1.Parameters.Add("VEPPROVVA05", OracleType.NVarChar).Value = dwData["VEPPROVVA05"].ToString(); 
          or1.Parameters.Add("VEPPROVAP05", OracleType.NVarChar).Value = dwData["VEPPROVAP05"].ToString(); 
          or1.Parameters.Add("VEPPROVAA05", OracleType.NVarChar).Value = dwData["VEPPROVAA05"].ToString(); 
          or1.Parameters.Add("VEPPROVKP05", OracleType.NVarChar).Value = dwData["VEPPROVKP05"].ToString(); 
          or1.Parameters.Add("VEPPROVKA05", OracleType.NVarChar).Value = dwData["VEPPROVKA05"].ToString(); 
          or1.Parameters.Add("VEPZENSUR06", OracleType.NVarChar).Value = dwData["VEPZENSUR06"].ToString(); 
          or1.Parameters.Add("VEPORDER06", OracleType.NVarChar).Value = dwData["VEPORDER06"].ToString(); 
          or1.Parameters.Add("VEPABMGE06", OracleType.NVarChar).Value = dwData["VEPABMGE06"].ToString(); 
          or1.Parameters.Add("VEPPROVVP06", OracleType.NVarChar).Value = dwData["VEPPROVVP06"].ToString(); 
          or1.Parameters.Add("VEPPROVVA06", OracleType.NVarChar).Value = dwData["VEPPROVVA06"].ToString(); 
          or1.Parameters.Add("VEPPROVAP06", OracleType.NVarChar).Value = dwData["VEPPROVAP06"].ToString(); 
          or1.Parameters.Add("VEPPROVAA06", OracleType.NVarChar).Value = dwData["VEPPROVAA06"].ToString(); 
          or1.Parameters.Add("VEPPROVKP06", OracleType.NVarChar).Value = dwData["VEPPROVKP06"].ToString(); 
          or1.Parameters.Add("VEPPROVKA06", OracleType.NVarChar).Value = dwData["VEPPROVKA06"].ToString(); 
          or1.Parameters.Add("VEPZENSUR07", OracleType.NVarChar).Value = dwData["VEPZENSUR07"].ToString(); 
          or1.Parameters.Add("VEPORDER07", OracleType.NVarChar).Value = dwData["VEPORDER07"].ToString(); 
          or1.Parameters.Add("VEPABMGE07", OracleType.NVarChar).Value = dwData["VEPABMGE07"].ToString(); 
          or1.Parameters.Add("VEPPROVVP07", OracleType.NVarChar).Value = dwData["VEPPROVVP07"].ToString(); 
          or1.Parameters.Add("VEPPROVVA07", OracleType.NVarChar).Value = dwData["VEPPROVVA07"].ToString(); 
          or1.Parameters.Add("VEPPROVAP07", OracleType.NVarChar).Value = dwData["VEPPROVAP07"].ToString(); 
          or1.Parameters.Add("VEPPROVAA07", OracleType.NVarChar).Value = dwData["VEPPROVAA07"].ToString(); 
          or1.Parameters.Add("VEPPROVKP07", OracleType.NVarChar).Value = dwData["VEPPROVKP07"].ToString(); 
          or1.Parameters.Add("VEPPROVKA07", OracleType.NVarChar).Value = dwData["VEPPROVKA07"].ToString(); 
          or1.Parameters.Add("VEPZENSUR08", OracleType.NVarChar).Value = dwData["VEPZENSUR08"].ToString(); 
          or1.Parameters.Add("VEPORDER08", OracleType.NVarChar).Value = dwData["VEPORDER08"].ToString(); 
          or1.Parameters.Add("VEPABMGE08", OracleType.NVarChar).Value = dwData["VEPABMGE08"].ToString(); 
          or1.Parameters.Add("VEPPROVVP08", OracleType.NVarChar).Value = dwData["VEPPROVVP08"].ToString(); 
          or1.Parameters.Add("VEPPROVVA08", OracleType.NVarChar).Value = dwData["VEPPROVVA08"].ToString(); 
          or1.Parameters.Add("VEPPROVAP08", OracleType.NVarChar).Value = dwData["VEPPROVAP08"].ToString(); 
          or1.Parameters.Add("VEPPROVAA08", OracleType.NVarChar).Value = dwData["VEPPROVAA08"].ToString(); 
          or1.Parameters.Add("VEPPROVKP08", OracleType.NVarChar).Value = dwData["VEPPROVKP08"].ToString(); 
          or1.Parameters.Add("VEPPROVKA08", OracleType.NVarChar).Value = dwData["VEPPROVKA08"].ToString(); 
          or1.Parameters.Add("VEPZENSUR09", OracleType.NVarChar).Value = dwData["VEPZENSUR09"].ToString(); 
          or1.Parameters.Add("VEPORDER09", OracleType.NVarChar).Value = dwData["VEPORDER09"].ToString(); 
          or1.Parameters.Add("VEPABMGE09", OracleType.NVarChar).Value = dwData["VEPABMGE09"].ToString(); 
          or1.Parameters.Add("VEPPROVVP09", OracleType.NVarChar).Value = dwData["VEPPROVVP09"].ToString(); 
          or1.Parameters.Add("VEPPROVVA09", OracleType.NVarChar).Value = dwData["VEPPROVVA09"].ToString(); 
          or1.Parameters.Add("VEPPROVAP09", OracleType.NVarChar).Value = dwData["VEPPROVAP09"].ToString(); 
          or1.Parameters.Add("VEPPROVAA09", OracleType.NVarChar).Value = dwData["VEPPROVAA09"].ToString(); 
          or1.Parameters.Add("VEPPROVKP09", OracleType.NVarChar).Value = dwData["VEPPROVKP09"].ToString(); 
          or1.Parameters.Add("VEPPROVKA09", OracleType.NVarChar).Value = dwData["VEPPROVKA09"].ToString(); 
          or1.Parameters.Add("VEPSONDPV", OracleType.NVarChar).Value = dwData["VEPSONDPV"].ToString(); 
          or1.Parameters.Add("VEPSONDDATV", OracleType.NVarChar).Value = dwData["VEPSONDDATV"].ToString(); 
          or1.Parameters.Add("VEPSONDDATB", OracleType.NVarChar).Value = dwData["VEPSONDDATB"].ToString(); 
          or1.Parameters.Add("VEPERSTPV", OracleType.NVarChar).Value = dwData["VEPERSTPV"].ToString(); 
          or1.Parameters.Add("VEPVORDATB", OracleType.NVarChar).Value = dwData["VEPVORDATB"].ToString(); 
          or1.Parameters.Add("VEPFILLER", OracleType.NVarChar).Value = dwData["VEPFILLER"].ToString(); 
          or1.Parameters.Add("VEPAENZL", OracleType.NVarChar).Value = dwData["VEPAENZL"].ToString(); 
          or1.Parameters.Add("VEPAENB", OracleType.NVarChar).Value = dwData["VEPAENB"].ToString(); 
          or1.Parameters.Add("VEPAEND", OracleType.NVarChar).Value = dwData["VEPAEND"].ToString(); 
          or1.Parameters.Add("VEPNEUB", OracleType.NVarChar).Value = dwData["VEPNEUB"].ToString(); 
          or1.Parameters.Add("VEPNEUD", OracleType.NVarChar).Value = dwData["VEPNEUD"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
